<include file="Common:layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>管理员</h3>
                <h5>系统后台用户管理</h5>
            </div>
        </div>
    </div>

    <div class="flexigrid">
        <div class="mDiv">
            <div class="ftitle">
                <h3>管理员列表</h3>
                <h5></h5>
            </div>
            <form action="" id="search-form2" class="navbar-form form-inline" method="post">
                <div class="sDiv">
                    <div class="sDiv2">
                        <select name="brand_id" id="brand_id" class="select">
                            <option value="">角色</option>
                            <foreach name="brandList" item="v" key="k" >
                                <option value="{$v['id']}">{$v['name']}</option>
                            </foreach>
                        </select>
                        <select name="sta" class="select">
                            <option value="">状态</option>
                            <option value="1" <if condition="$_GET['sta'] eq 1">selected</if>>正常</option>
                            <option value="0" <if condition="$_GET['sta'] eq '0'">selected</if>>关闭</option>
                        </select>

                        <!--排序规则-->
                        <input type="text" size="30" name="mName" class="qsbox" placeholder="姓名...">
                        <input type="submit" class="btn" value="搜索">
                        <input type="hidden" name="m" value="admin"/>
                        <input type="hidden" name="c" value="auth"/>
                        <input type="hidden" name="a" value="administrators"/>
                    </div>
                </div>
            </form>
        </div>
        <div class="hDiv">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0">
                    <thead>
                    <tr>
                        <th align="left" axis="col6" class="">
                            <div style="text-align: left; width:50px;" class="">ID</div>
                        </th>
                        <th align="left" axis="col6" class="">
                            <div style="text-align: center; width:65px;" class="">操作</div>
                        </th>
                        <th align="left" axis="col4" class="">
                            <div style="text-align: center; width: 150px;" class="">姓名</div>
                        </th>
                        <th align="center" axis="col6" class="">
                            <div style="text-align: center; width: 100px;" class="">手机号</div>
                        </th>
                        <th align="center" axis="col6" class="">
                            <div style="text-align: center; width: 240px;" class="">邮箱</div>
                        </th>
                        <th align="center" axis="col6" class="">
                            <div style="text-align: center; width: 50px;" class="">启用</div>
                        </th>
                        <th align="center" axis="col6" class="">
                            <div style="text-align: center; width: 150px;" class="">角色</div>
                        </th>
                        <th style="width:100%" axis="col7">
                            <div></div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="tDiv">
            <div class="tDiv2">
                <div class="fbutton">
                    <a href="{:U('Auth/add_administrators')}">
                        <div class="add" title="添加管理员">
                            <span><i class="fa fa-plus"></i>添加管理员</span>
                        </div>
                    </a>
                </div>
            </div>
            <div style="clear:both"></div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table>
                    <tbody>
                    <foreach name="admins" item="admin" key="k" >
                        <tr>
                            <td align="center" axis="col0">
                                <div style="width: 50px;">{$admin['manager_id']}</div>
                            </td>
                            <td class="">
                                <div style="text-align:center; width:65px !important;">
                                    <a class="btn orange" href="{:U('Auth/edit_admin',array('id'=>$admin['manager_id']))}"><i class="fa fa-edit"></i>编辑</a>
                                </div>
                            </td>
                            <td align="center" axis="col0">
                                <div style="text-align: center; width: 150px;">{$admin['user_name']}</div>
                            </td>
                            <td align="center" axis="col0">
                                <div style="text-align: center; width: 100px;">{$admin['mobile']}</div>
                            </td>
                            <td align="center" axis="col0">
                                <div style="text-align: center; width: 240px;">{$admin['email']}</div>
                            </td>
                            <td align="center" axis="col0">
                                <div style="text-align: center; width: 50px;">
                                    <if condition="$admin['manager_id'] neq 1">
                                        <if condition="$admin['m_status'] eq 1">
                                            <span class="yes" onClick="changeTableVal('manager','id','{$admin.manager_id}','m_status',this)"><i class="fa fa-check-circle"></i>是</span>
                                            <else/>
                                            <span class="no" onClick="changeTableVal('manager','id','{$admin.manager_id}','m_status',this)"><i class="fa fa-ban"></i>否</span>
                                        </if><else/>
                                        <span class="yes">是</span>
                                    </if>

                                </div>
                            </td>
                            <td align="center" axis="col0">
                                <div style="text-align: center; width: 150px;">{$admin['role_name']}</div>
                            </td>
                            <td align="" class="" style="width: 100%;">
                                <div>&nbsp;</div>
                            </td>
                        </tr>
                    </foreach>

                    </tbody>
                </table>
                {$page}
            </div>
        </div>

    </div>
</div>
</body>
</html>